﻿using System;
using System.Globalization;

namespace System.Management.Automation.Host
{
    public struct Size
    {
        private int height;

        private int width;

        public int Height
        {
            get
            {
                return this.height;
            }
            set
            {
                this.height = value;
            }
        }

        public int Width
        {
            get
            {
                return this.width;
            }
            set
            {
                this.width = value;
            }
        }

        public Size(int width, int height)
        {
            this.width = width;
            this.height = height;
        }

        public override bool Equals(object obj)
        {
            bool flag = false;
            if (obj.GetType() == typeof(Size))
            {
                flag = this == (Size)obj;
            }
            return flag;
        }

        public static bool operator ==(Size first, Size second)
        {
            bool width = first.Width == second.Width && first.Height == second.Height;
            return width;
        }

        public static bool operator !=(Size first, Size second)
        {
            return !(first == second);
        }

        public override string ToString()
        {
            object[] objArray;
            return string.Format(CultureInfo.InvariantCulture, "{0},{1}", new object[] { this.Width, this.Height });
        }
    }
}
